package com.hanliy.dto;

/**
 * @author hanyulin
 * @apiNote
 * @date 2021/12/3 11:10
 */
public enum ResponseEnum {
    /**
     * 200 请求成功
     */
    SUCCESS(200,"请求成功"),

    /**
     * 400 非法请求
     */
    BAD_REQUEST(400,"非法请求"),

    /**
     * 401 尚未登录
     */
    UNAUTHORIZED(401,"尚未登录"),

    /**
     * 403 权限不足
     */
    FORBIDDEN(403,"权限不足"),

    /**
     * 500 请求失败
     */
    ERROR(500,"请求失败"),

    /**
     * 700 必填参数为空
     */
    ARGS_NULL(700,"必填参数为空"),

    /**
     * 701 参数错误
     */
    ARGS_ERROR(701,"参数错误");

    private Integer code;
    private String msg;

    ResponseEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
